package cn.bdqn.util;

public class PageUtil {
    private Integer pageNo=1;//当前页码
    private Integer pageSize=5;//每页显示多少条数据
    private Integer totalCount;//总条数
    private Integer totalPage;//总页数

    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getPageSize() {
        return pageSize;
    }
    //当每页显示的数据条数固定的时候，我们不再对外提供set
   /* public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }*/

    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }

    public Integer getTotalPage() {
        return totalCount%pageSize==0?totalCount/pageSize:totalCount/pageSize+1;
    }

   /* public void setTotalPage(Integer totalPage) {
        this.totalPage = totalPage;
    }*/
}
